#ifndef SCREENWIDGET_H
#define SCREENWIDGET_H

#include <QWidget>
#include <QPainter>
#include <QMouseEvent>
#include <QKeyEvent>
class screenWidget : public QWidget
{
    Q_OBJECT
public:
    explicit screenWidget(QWidget *parent = nullptr);
    QPixmap totalScreen;
    QPixmap cutScreen;
signals:
    void cut(QPixmap p);
public slots:
private:
    void paintEvent(QPaintEvent *e) override;
    void mousePressEvent(QMouseEvent *e) override;
    void mouseMoveEvent(QMouseEvent *e) override;
    void mouseReleaseEvent(QMouseEvent *e) override;
    void keyPressEvent(QKeyEvent *e) override;
    bool isMousePress;
    QPoint beginPoint;
    QPoint endPoint;
};

#endif // SCREENWIDGET_H
